<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>5_3_1-1-组件插槽的基本用法</title>
</head>

<body>


  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <div id="Application">
    <my-container>组件内部</my-container>
  </div>
  <script>
    const App = Vue.createApp({});
    const containerComponent = {
      template: `<div style="border-style:solid; border-color:red; border-width:10px;">
                <slot></slot>
                </div>`,
    };

    App.component("my-container", containerComponent);

    App.mount("#Application");
  </script>
</body>

</html>